package com.szqhyxj.youxiangju.biz.merchantHome.notice;

import com.google.gson.annotations.SerializedName;
import com.szqhyxj.youxiangju.sys.BaseResult;
import com.szqhyxj.youxiangju.sys.RetrofitFacade;

import io.reactivex.Observable;
import retrofit2.http.POST;

/**
 * Created by leung on 2018/12/11.
 */

public class NoticeModel {

    private interface Notice {
        @POST("notice/getnotice")
        Observable<BaseResult<NoticeBean>> notice();
    }

    public static Observable<BaseResult<NoticeBean>> getnotice() {
        return RetrofitFacade.Companion.getRetrofit()
                .create(Notice.class)
                .notice();
    }


    public static class NoticeBean{

        @SerializedName("noticeInfo")
        private String noticeInfo;

        @SerializedName("noticeStartTime")
        private String noticeStartTime;

        @SerializedName("noticeEditTime")
        private Object noticeEditTime;

        @SerializedName("noticeEndTime")
        private String noticeEndTime;

        @SerializedName("noticeId")
        private int noticeId;

        @SerializedName("noticeTitle")
        private String noticeTitle;

        public void setNoticeInfo(String noticeInfo){
            this.noticeInfo = noticeInfo;
        }

        public String getNoticeInfo(){
            return noticeInfo;
        }

        public void setNoticeStartTime(String noticeStartTime){
            this.noticeStartTime = noticeStartTime;
        }

        public String getNoticeStartTime(){
            return noticeStartTime;
        }

        public void setNoticeEditTime(Object noticeEditTime){
            this.noticeEditTime = noticeEditTime;
        }

        public Object getNoticeEditTime(){
            return noticeEditTime;
        }

        public void setNoticeEndTime(String noticeEndTime){
            this.noticeEndTime = noticeEndTime;
        }

        public String getNoticeEndTime(){
            return noticeEndTime;
        }

        public void setNoticeId(int noticeId){
            this.noticeId = noticeId;
        }

        public int getNoticeId(){
            return noticeId;
        }

        public void setNoticeTitle(String noticeTitle){
            this.noticeTitle = noticeTitle;
        }

        public String getNoticeTitle(){
            return noticeTitle;
        }

        @Override
         public String toString(){
            return
                "Response{" +
                "noticeInfo = '" + noticeInfo + '\'' +
                ",noticeStartTime = '" + noticeStartTime + '\'' +
                ",noticeEditTime = '" + noticeEditTime + '\'' +
                ",noticeEndTime = '" + noticeEndTime + '\'' +
                ",noticeId = '" + noticeId + '\'' +
                ",noticeTitle = '" + noticeTitle + '\'' +
                "}";
            }
    }
}
